﻿using System;
using System.Collections;
using System.Collections.Generic;
using Gameplay.PVE.Survivor;
using OWL.Rendering.HRP;
using UnityEngine;
using Yoozoo.HRP.Runtime;

public class BattleMonsterData : MonoBehaviour
{
    public int heroId;
    public EEnemyAIType aiType;
    [Tooltip("是否通知组员")]public bool transmitToGroup;
    public float searchRange;
    public EMapUnitType unitType;
    public Transform point;

    [Tooltip("是否巡逻")]public bool isPatrol;
    public string extraParam1;
    public string extraParam2;

    public int specialIndex;

    public float attributeRatio = 1;

    public int team = 2;
    
    private void OnDrawGizmos()
    {
        if (searchRange > 0)
        {
            Gizmos.color = Color.yellow;
            var count = 30;
            for (int i = 0; i < count; i++)
            {
                var interval = 360 / count;
                var angle = i * interval;
                var dir = Quaternion.Euler(0, angle, 0) * transform.forward;
                var dir2 = Quaternion.Euler(0, angle + interval, 0) * transform.forward;
                var startPosition = transform.position + new Vector3(0, 0.3f, 0);
                Gizmos.DrawLine(startPosition + dir * searchRange, startPosition + dir2 * searchRange);
            }
        }
    }
}
